<?php

/**
 * SrcmtMilicianos form base class.
 *
 * @method SrcmtMilicianos getObject() Returns the current form's model object
 *
 * @package    srcmt
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseSrcmtMilicianosForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'codigo_miliciano'             => new sfWidgetFormInputHidden(),
      'nacionalidad'                 => new sfWidgetFormInputText(),
      'cedula_identidad'             => new sfWidgetFormInputText(),
      'primer_apellido'              => new sfWidgetFormInputText(),
      'segundo_apellido'             => new sfWidgetFormInputText(),
      'primer_nombre'                => new sfWidgetFormInputText(),
      'segundo_nombre'               => new sfWidgetFormInputText(),
      'sexo'                         => new sfWidgetFormInputCheckbox(),
      'fecha_nacimiento'             => new sfWidgetFormDate(),
      'estado_civil'                 => new sfWidgetFormInputText(),
      'foto'                         => new sfWidgetFormInputText(),
      'grupo_sanguineo'              => new sfWidgetFormInputText(),
      'codigo_estado'                => new sfWidgetFormInputText(),
      'codigo_municipio'             => new sfWidgetFormInputText(),
      'codigo_parroquia'             => new sfWidgetFormInputText(),
      'codigo_ciudad'                => new sfWidgetFormInputText(),
      'direccion'                    => new sfWidgetFormTextarea(),
      'telefono_local'               => new sfWidgetFormInputText(),
      'movil'                        => new sfWidgetFormInputText(),
      'correo_electronico'           => new sfWidgetFormInputText(),
      'direccion_emergencia'         => new sfWidgetFormTextarea(),
      'telefono_emergencia'          => new sfWidgetFormInputText(),
      'grado_instruccion'            => new sfWidgetFormInputText(),
      'especialidad'                 => new sfWidgetFormTextarea(),
      'idiomas'                      => new sfWidgetFormInputText(),
      'nivel_dominio_idioma'         => new sfWidgetFormInputText(),
      'programa_formacion_grado'     => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('SrcmtPfg'), 'add_empty' => false)),
      'trayecto'                     => new sfWidgetFormInputText(),
      'tramo'                        => new sfWidgetFormInputText(),
      'aldea'                        => new sfWidgetFormTextarea(),
      'sedes'                        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('SrcmtSedes'), 'add_empty' => false)),
      'componente'                   => new sfWidgetFormInputText(),
      'jerarquia'                    => new sfWidgetFormInputText(),
      'contigente'                   => new sfWidgetFormInputText(),
      'arma_servicio'                => new sfWidgetFormTextarea(),
      'batallon_unidad_origen'       => new sfWidgetFormInputText(),
      'profesion'                    => new sfWidgetFormInputText(),
      'oficio'                       => new sfWidgetFormInputText(),
      'trabaja_si_no'                => new sfWidgetFormInputCheckbox(),
      'nombre_empresa'               => new sfWidgetFormInputText(),
      'direccion_oficina'            => new sfWidgetFormTextarea(),
      'telefono_oficina'             => new sfWidgetFormInputText(),
      'posee_vehiculo'               => new sfWidgetFormInputCheckbox(),
      'tipo_vehiculo'                => new sfWidgetFormInputText(),
      'modelo_vehiculo'              => new sfWidgetFormInputText(),
      'numero_placa'                 => new sfWidgetFormInputText(),
      'posee_licencia'               => new sfWidgetFormInputCheckbox(),
      'grado_licencia'               => new sfWidgetFormInputText(),
      'porte_armas'                  => new sfWidgetFormInputCheckbox(),
      'numero_porte_armas'           => new sfWidgetFormInputText(),
      'tipo_armamento'               => new sfWidgetFormInputText(),
      'calibre_armamento'            => new sfWidgetFormInputText(),
      'signos_particulares'          => new sfWidgetFormTextarea(),
      'talla_uniforme'               => new sfWidgetFormInputText(),
      'talla_calzado'                => new sfWidgetFormInputText(),
      'estatura'                     => new sfWidgetFormInputText(),
      'peso'                         => new sfWidgetFormInputText(),
      'color_cabello'                => new sfWidgetFormInputText(),
      'color_piel'                   => new sfWidgetFormInputText(),
      'discapacidad'                 => new sfWidgetFormTextarea(),
      'alergias'                     => new sfWidgetFormTextarea(),
      'dominio_mano'                 => new sfWidgetFormInputText(),
      'practica_deporte'             => new sfWidgetFormInputCheckbox(),
      'deporte'                      => new sfWidgetFormInputText(),
      'participa_actividad_cultural' => new sfWidgetFormInputCheckbox(),
      'actividad_cultural'           => new sfWidgetFormInputText(),
      'agrupacion_social'            => new sfWidgetFormTextarea(),
      'partido_politico'             => new sfWidgetFormInputText(),
      'misiones'                     => new sfWidgetFormTextarea(),
      'cooperativas'                 => new sfWidgetFormTextarea(),
      'apellidos_beneficiario'       => new sfWidgetFormInputText(),
      'nombres_beneficiario'         => new sfWidgetFormInputText(),
      'cedula_beneficiario'          => new sfWidgetFormInputText(),
      'telefono_beneficiario'        => new sfWidgetFormInputText(),
      'created_at'                   => new sfWidgetFormDateTime(),
      'updated_at'                   => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'codigo_miliciano'             => new sfValidatorChoice(array('choices' => array($this->getObject()->get('codigo_miliciano')), 'empty_value' => $this->getObject()->get('codigo_miliciano'), 'required' => false)),
      'nacionalidad'                 => new sfValidatorString(array('max_length' => 1)),
      'cedula_identidad'             => new sfValidatorInteger(),
      'primer_apellido'              => new sfValidatorString(array('max_length' => 30)),
      'segundo_apellido'             => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'primer_nombre'                => new sfValidatorString(array('max_length' => 30)),
      'segundo_nombre'               => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'sexo'                         => new sfValidatorBoolean(),
      'fecha_nacimiento'             => new sfValidatorDate(),
      'estado_civil'                 => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'foto'                         => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'grupo_sanguineo'              => new sfValidatorString(array('max_length' => 4)),
      'codigo_estado'                => new sfValidatorInteger(array('required' => false)),
      'codigo_municipio'             => new sfValidatorInteger(array('required' => false)),
      'codigo_parroquia'             => new sfValidatorInteger(array('required' => false)),
      'codigo_ciudad'                => new sfValidatorInteger(array('required' => false)),
      'direccion'                    => new sfValidatorString(),
      'telefono_local'               => new sfValidatorString(array('max_length' => 20)),
      'movil'                        => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'correo_electronico'           => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'direccion_emergencia'         => new sfValidatorString(),
      'telefono_emergencia'          => new sfValidatorString(array('max_length' => 20)),
      'grado_instruccion'            => new sfValidatorString(array('max_length' => 14)),
      'especialidad'                 => new sfValidatorString(),
      'idiomas'                      => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'nivel_dominio_idioma'         => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'programa_formacion_grado'     => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('SrcmtPfg'))),
      'trayecto'                     => new sfValidatorString(array('max_length' => 3)),
      'tramo'                        => new sfValidatorString(array('max_length' => 3)),
      'aldea'                        => new sfValidatorString(array('required' => false)),
      'sedes'                        => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('SrcmtSedes'))),
      'componente'                   => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'jerarquia'                    => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'contigente'                   => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'arma_servicio'                => new sfValidatorString(array('required' => false)),
      'batallon_unidad_origen'       => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'profesion'                    => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'oficio'                       => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'trabaja_si_no'                => new sfValidatorBoolean(array('required' => false)),
      'nombre_empresa'               => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'direccion_oficina'            => new sfValidatorString(array('required' => false)),
      'telefono_oficina'             => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'posee_vehiculo'               => new sfValidatorBoolean(array('required' => false)),
      'tipo_vehiculo'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'modelo_vehiculo'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'numero_placa'                 => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'posee_licencia'               => new sfValidatorBoolean(array('required' => false)),
      'grado_licencia'               => new sfValidatorString(array('max_length' => 5, 'required' => false)),
      'porte_armas'                  => new sfValidatorBoolean(array('required' => false)),
      'numero_porte_armas'           => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'tipo_armamento'               => new sfValidatorString(array('max_length' => 11, 'required' => false)),
      'calibre_armamento'            => new sfValidatorString(array('max_length' => 5, 'required' => false)),
      'signos_particulares'          => new sfValidatorString(array('required' => false)),
      'talla_uniforme'               => new sfValidatorString(array('max_length' => 3)),
      'talla_calzado'                => new sfValidatorString(array('max_length' => 2)),
      'estatura'                     => new sfValidatorString(array('max_length' => 3)),
      'peso'                         => new sfValidatorNumber(),
      'color_cabello'                => new sfValidatorString(array('max_length' => 10)),
      'color_piel'                   => new sfValidatorString(array('max_length' => 20)),
      'discapacidad'                 => new sfValidatorString(array('required' => false)),
      'alergias'                     => new sfValidatorString(array('required' => false)),
      'dominio_mano'                 => new sfValidatorString(array('max_length' => 15)),
      'practica_deporte'             => new sfValidatorBoolean(array('required' => false)),
      'deporte'                      => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'participa_actividad_cultural' => new sfValidatorBoolean(array('required' => false)),
      'actividad_cultural'           => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'agrupacion_social'            => new sfValidatorString(array('required' => false)),
      'partido_politico'             => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'misiones'                     => new sfValidatorString(array('required' => false)),
      'cooperativas'                 => new sfValidatorString(array('required' => false)),
      'apellidos_beneficiario'       => new sfValidatorString(array('max_length' => 60)),
      'nombres_beneficiario'         => new sfValidatorString(array('max_length' => 60)),
      'cedula_beneficiario'          => new sfValidatorString(array('max_length' => 11)),
      'telefono_beneficiario'        => new sfValidatorString(array('max_length' => 11)),
      'created_at'                   => new sfValidatorDateTime(),
      'updated_at'                   => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('srcmt_milicianos[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'SrcmtMilicianos';
  }

}
